package online.niuma.xiaocubao.pojo.vo;

import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * @author 一颗蛋50斤
 * IntelliJ IDEA
 */
@Data
@AllArgsConstructor
public class Result {

    private int code;

    private String message;

    private Object data;

    public static Result success(Object data) {
        return new Result(200, "success", data);
    }

    public static Result fail(int code, String massage) {
        return new Result(code, massage, null);
    }
}
